import request from '@/utils/request'

// 获取会员配置
export const getMemberConfig = () => {
  return request({
    url: '/system/config',
    method: 'GET'
  })
}

// 创建订单
export const createOrder = (data) => {
  return request({
    url: '/order/create',
    method: 'POST',
    data
  })
}

// 查询订单状态
export const getOrderStatus = (orderNo) => {
  return request({
    url: '/order/query',
    method: 'GET',
    params: { order_no: orderNo }
  })
}

// 卡密兑换
export const exchangeCard = (cardNo) => {
  return request({
    url: '/card/exchange',
    method: 'POST',
    data: { card_no: cardNo }
  })
}

// 获取分享参数
export const getShareParams = () => {
  return request({
    url: '/share/params',
    method: 'GET'
  })
}

// 获取分享统计
export const getShareStats = () => {
  return request({
    url: '/share/stats',
    method: 'GET'
  })
} 